package likou.jindian;

/**
 * @author: Tangxz
 * @email: 1171702529@qq.com
 * @cate: 2020/12/27 08:23
 */
public class _05_07 {
    public static void main(String[] args) {
        System.out.println(exchangeBits(3));
    }
    public static int exchangeBits(int num) {
        int daan = 0;
        int marRight = 0;
        for(int i=0;i<16;i++){
            int now = num&(3<<marRight);
            now = now>>marRight;
            if(now==1||now==2){
                now^=3;
            }
            daan+=now<<marRight;
            marRight+=2;
        }
        return daan;
    }
    public static void say(){
        class J{
            int date;
            int qwe;
        }
        J j = new J();
    }
}
